package zhihui.mobile.ui.express;

import android.app.Activity;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import zhihui.mobile.R;
import zhihui.mobile.bean.express.ExpressBeanListV2;

/**
 * Created by 冰冰冰 on 2017/9/26.
 */

class ExpressHistorySendAdapter extends BaseQuickAdapter<ExpressBeanListV2.DataBean.OuterBean, BaseViewHolder> {


    private Activity context;

    public ExpressHistorySendAdapter(List data, Activity context) {
        super(R.layout.item_express_get_history, data);
        this.context = context;
    }

    @Override
    protected void convert(final BaseViewHolder helper, ExpressBeanListV2.DataBean.OuterBean item) {
        helper.setVisible(R.id.item_express_histroy_get_layout, false);
        helper.setVisible(R.id.item_express_histroy_send_layout, true);
        helper.setText(R.id.item_express_histroy_name_send_tv, "包裹源：" + item.getEname_f());
        helper.setText(R.id.item_express_histroy_id_send_tv, "快递单号：" + item.getOrdersn_f());
        helper.setText(R.id.item_express_histroy_time_send_tv, "寄件时间：" + item.getTime_f());
        helper.setText(R.id.item_express_histroy_paynum_tv, "快递费用：" + Double.parseDouble(item.getMoney_f()) / 100);
        helper.setText(R.id.item_express_histroy_username_tv, "收货人：" + item.getUname_f());
        helper.setText(R.id.item_express_histroy_phone_tv, "联系电话：" + item.getUtel_f());
        helper.setText(R.id.item_express_histroy_address_tv, "收货地址：" + item.getUaddress_f());

    }

}
